package com.mdd.common.entity.order;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@ApiModel("租赁订单详情实体")
@TableName("order_lease_details")
public class OrderLeaseDetails  implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value="id", type= IdType.AUTO)
    @ApiModelProperty(value = "编号")
    private Long id;

    @ApiModelProperty(value = "订单id")
    private Long orderId;

    @ApiModelProperty(value = "用户id")
    private Long userId;

    @ApiModelProperty(value = "车辆id")
    private Long vehicleId;

    @ApiModelProperty(value = "服务类型")
    private Integer serviceType;

    @ApiModelProperty(value = "租赁类型 1、月 2、周 3、日")
    private Integer leaseType;

    @ApiModelProperty(value = "租赁周期")
    private Integer leasePeriod;

    @ApiModelProperty(value = "当前租期")
    private Integer currentPeriod;

    @ApiModelProperty(value = "首付")
    private BigDecimal downPayments;

    @ApiModelProperty(value = "原押金")
    private BigDecimal deposit;

    @ApiModelProperty(value = "实际押金")
    private BigDecimal actualDeposit;

    @ApiModelProperty(value = "每期租金")
    private BigDecimal eachIssue;

    @ApiModelProperty(value = "其他费用")
    private BigDecimal otherExpenses;

    @ApiModelProperty(value = "到期日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date dueDate;

    @ApiModelProperty(value = "完成时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date completionTime;

    @ApiModelProperty(value = "订单车辆状态 0未交车 1 已交车 2 已还车")
    private Integer orderVehicleStatus;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT,value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE,value = "update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
}
